package main

import (
	"fmt"
	"reflect"
)

type NotknownType struct {
	s1, s2, s3 string
}

func (t NotknownType) String() string {
	return t.s1 + " - " + t.s2 + " - " + t.s3
}

var secret interface{} = NotknownType{"Ada", "Go", "Oberon"}

func main() {
	value := reflect.ValueOf(secret)
	typ := reflect.TypeOf(secret)
	fmt.Println("reflect.TypeOf: ", typ)
	knd := value.Kind()
	fmt.Println("value.Kind(): ", knd)

	for i := 0; i < value.NumField(); i++ {
		fmt.Printf("Field %d: %v\n", i, value.Field(i))
	}

	call := value.Method(0).Call(nil)
	fmt.Println("Method(0).Call(): ", call)
}
